<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

// return [
//     '__pattern__' => [
//         'name' => '\w+',
//     ],
//     '[hello]'     => [
//         ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
//         ':name' => ['index/hello', ['method' => 'post']],
//     ],

// ];


// 定义api路由
Route::get('test','api/index/index');

//登录的接口
// Route::get('login','api/login/index');
Route::post('login','api/login/index');


//添加应用程序的接口
// Route::get('appAdd','api/AppManager/save');
Route::post('appAdd','api/AppManager/save');

//查询所有的数据
// Route::get('apps','api/AppManager/index');
Route::post('apps','api/AppManager/index');

// 删除一个app
Route::post('apps/delete','api/AppManager/delete');

//更新数据
// Route::get('apps/edit','api/AppManager/edit');
Route::post('apps/edit','api/AppManager/edit');

//根据bundle id 查询 该bundle 对应的数据信息
// Route::get('apps/info','api/AppManager/appInfo');
Route::post('apps/info','api/AppManager/appInfo');

// app端调用查询设备信息
// Route::get('apps/device','api/AppDevice/index');
Route::post('apps/device','api/AppDevice/index');

// 添加设备
Route::post('apps/device/add','api/AppDevice/create');

//查询某个应用名称和bundle id 对应的注册设备的数量
Route::post('apps/devicecount','api/AppDevice/read');


// ======一人三餐接口
Route::post('baby/register','api/Baby/register');
// 添加类型
Route::post('baby/addType','api/BabyType/save');
// 查看当前用户的类型
Route::post('baby/findType','api/BabyType/index');

// 添加宝宝
Route::post('baby/addName','api/BabyName/save');

// 查看宝宝
Route::post('baby/findName','api/BabyName/index');

// 发布状态
Route::post('baby/addLife','api/BabyLife/save');

// 查看状态
Route::post('baby/findLife','api/BabyLife/index');
